<?php

namespace think;

use think\wework\Api\Bot;
use think\wework\Api\Tag;
use think\wework\Api\User;
use think\wework\Api\Corp;
use think\wework\Api\Menu;
use think\wework\Api\OAuth;
use think\wework\Api\Media;
use think\wework\Api\JsSdk;
use think\wework\Api\Agent;
use think\wework\Api\Batch;
use think\wework\Api\Token;
use think\wework\Api\AppChat;
use think\wework\Api\CheckIn;
use think\wework\Api\Invoice;
use think\wework\Api\Message;
use think\wework\Api\Callback;
use think\wework\Api\GroupChat;
use think\wework\Api\GroupSend;
use think\wework\Api\Department;
use think\wework\Api\ExternalContact;
use think\wework\Command\BotListen;
use think\wework\Command\BotWorker;

class Wework extends Service
{
    public const BotTokenListKey = 'WEWORK:BOT:TOKEN';
    public const BotTokenListHash = 'WEWORK:BOT:HASH';

    private function __clone() {}

    public function register() {}

    public function boot()
    {
        $this->commands([
            BotListen::class,
            BotWorker::class
        ]);
    }

    public static function Bot(string $token): Bot
    {
        return Bot::getInstance($token);
    }

    public static function OAuth(): OAuth
    {
        return OAuth::getInstance();
    }

    public static function Agent(): Agent
    {
        return Agent::getInstance();
    }

    public static function AppChat(): AppChat
    {
        return AppChat::getInstance();
    }

    public static function Batch(): Batch
    {
        return Batch::getInstance();
    }

    public static function Callback(): Callback
    {
        return Callback::getInstance();
    }

    public static function CheckIn(): CheckIn
    {
        return CheckIn::getInstance();
    }

    public static function Corp(): Corp
    {
        return Corp::getInstance();
    }

    public static function GroupChat(): GroupChat
    {
        return GroupChat::getInstance();
    }

    public static function GroupSend(): GroupSend
    {
        return GroupSend::getInstance();
    }

    public static function ExternalContact(): ExternalContact
    {
        return ExternalContact::getInstance();
    }

    public static function Department(): Department
    {
        return Department::getInstance();
    }

    public static function Invoice(): Invoice
    {
        return Invoice::getInstance();
    }

    public static function JsSdk(): JsSdk
    {
        return JsSdk::getInstance();
    }

    public static function Media(): Media
    {
        return Media::getInstance();
    }

    public static function Menu(): Menu
    {
        return Menu::getInstance();
    }

    public static function Message(): Message
    {
        return Message::getInstance();
    }

    public static function Tag(): Tag
    {
        return Tag::getInstance();
    }

    public static function Token(): Token
    {
        return Token::getInstance();
    }

    public static function User(): User
    {
        return User::getInstance();
    }
}